package com.jrx.anytxn.reporting.job.xib.step;

import com.jrx.anytxn.reporting.entity.CmInteCoLonRepayDtlCi;
import com.jrx.anytxn.reporting.entity.CmInteCoLonRepayPlanCi;
import com.jrx.anytxn.reporting.mapper.ext.ExtFtpInteCoLonMapper;
import org.springframework.batch.item.ItemWriter;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @comment: 免息成本报表Writer
 * @author: liuzb
 * @date: 2021/9/22 15:00
 */
@Service
public class RepayPlanCiWriter implements ItemWriter<CmInteCoLonRepayPlanCi> {

    @Resource
    private ExtFtpInteCoLonMapper extFtpInteCoLonMapper;

    @Override
    public void write(List<? extends CmInteCoLonRepayPlanCi> list) throws Exception {
        for (CmInteCoLonRepayPlanCi item : list) {
            extFtpInteCoLonMapper.insertSelectiveRepayPlanCi(item);
        }
    }

}
